/**
 * Created by hxpeng on 2017/3/24.
 */
(function () {
    'use strict';

    angular.module('App.pages.dynamic', [])
        .config(routeConfig);

    function routeConfig($stateProvider,$urlRouterProvider) {
        $stateProvider.state('dynamic', {
            url: "/dynamic",
            abstract: true,
            templateUrl: 'source/pages/page-tab.html',
        }).state('dynamic.index', {
            url: "/index",
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/dynamic/index.html',
                    controller:'DynamicCtrl as vm'
                }
            }
        }).state('dynamic.create', {
            url: "/create",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/dynamic/create.html',
                    controller:'DynamicCreateCtrl as vm'
                }
            }
        }).state('dynamic.info', {
            url: "/info?{dynamicId:string}",
            params: {
                dynamicId: null
            },
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/dynamic/info.html',
                    controller:'DynamicInfoCtrl as vm'
                }
            }
        }).state('dynamic.commentInfo', {
            url: "/commentInfo?{commentId:string}&{dynamicId:string}",
            cache: false,
            params: {
                commentId: null,
                dynamicId: null
            },
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/dynamic/dynamicCommentInfo.html',
                    controller:'DynamicCommentInfoCtrl as vm'
                }
            }
        });
    }
})();